Called when user clicks on a toolbar item.

<div class="definition">
    click(id, [event])
</div>

<div class="arguments">
    <table>
    <tr>
        <td>id</td>
        <td><b>string</b>, id of the toolbar item</td>
    </tr>
    <tr>
        <td>event</td>
        <td><b>object</b>, DOM Event object</td>
    </tr>
    </table>
</div>

Returns <i>undefined</i>.

<h4>Description</h4>

This method is called when user clicks on the toolbar item. It is used internally, but you can use it to emulate clicks. This method
emits <a class="method" href="w2toolbar.onClick">.onClick</a> event.
<div style="height: 10px"></div>

If you have toolbar defined in the following way:
<textarea class="javascript">
let toolbar = new w2toolbar({
    name  : 'toolbar',
    items : [
        { type: 'check',  id: 'item1', text: 'Check', icon: 'icon-page', checked: false },
        { type: 'radio',  id: 'item3',  group: '1', text: 'R-1', icon: 'icon-add' },
        { type: 'radio',  id: 'item4',  group: '1', text: 'R-2', icon: 'icon-add' },
        { type: 'menu',   id: 'item5', text: 'Drop Down',
            items: [
                { id: 'id1', text: 'menu 1' },
                { id: 'id2', text: 'menu 2' },
                { id: 'id3', text: 'menu 3' },
            ]
        }
    ]
});
</textarea>

You can check toolbar item:
<textarea class="javascript">
w2ui.toolbar.click('item1');
</textarea>

You can also click toolbar menu item:
<textarea class="javascript">
w2ui.toolbar.click('item5:id2');
</textarea>
